package com.fbty.mt.domain;
/**
 * 共享类ip实体类
 */
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "tab_ip_info", catalog = "mt", uniqueConstraints = {})
public class IpInfo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false, insertable = true, updatable = true)
	private Integer id;
	/**
	 * ip地址
	 */
	private String ip;
	/** 国家  */
	private String country;
	/** 地区  */
	private String region;
	/** 城市  */
	private String city;
	/** 速率  */
	private String speed;
	/** 延迟  */
	private String delay;
	/** 类型  */
	private String type;
	/** 端口  */
	private String port;
	/** 上传时间  */
	private Date updateTime;
	/**
	 * 状态
	 * 0 表示正常
	 * 1 表示出现过1次没有ping通
	 * 2 表示出现过2次没有ping通
	 * 3 表示出现过2次没有ping通
	 * 如果大于3次就不进行扫描了
	 */
	private Integer state = 0;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public String getRegion() {
		return region;
	}
	public void setRegion(String region) {
		this.region = region;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getSpeed() {
		return speed;
	}
	public void setSpeed(String speed) {
		this.speed = speed;
	}
	public String getDelay() {
		return delay;
	}
	public void setDelay(String delay) {
		this.delay = delay;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}

	public String getPort() {
		return port;
	}
	public void setPort(String port) {
		this.port = port;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public String getTime() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return sdf.format(updateTime);
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	@Override
	public String toString() {
		return "IpInfo [id=" + id + ", ip=" + ip + ", country=" + country
				+ ", region=" + region + ", city=" + city + ", speed=" + speed
				+ ", delay=" + delay + ", type=" + type + ", port=" + port
				+ ", updateTime=" + updateTime + ", state=" + state + "]";
	}
	
	
}
